# Author: Morrison # Date created: 1 Oct 2021 # Date last modified: 1 Oct 2021 # Program: algore.py # #################### Problem 1 ########################### def swap(x, j, k): if j != k: x[j],x[k] = x[k], x[j] def adjacent_neighbors(x): """prec x is a homogeneous list of sortable items postc: x is sorted in-place using the adjacent neighbors algorithm""" def trickle_down(x): """prec x is a homogeneous list of sortable items postc: x is sorted in-place using the trickle down algorithm"""